


window.templateLoader = {
    load: function(views, callback) {
        $.each(views, function(index, view) {

            $.ajax({
                async:false,
                url:'tpl/'+view+'.html?m='+Math.random()*100,
                dataType:'text',
                type:'get',
                success:function(data){
                    templateLoader[view] = data;
                }
            })
        });

        $.when.apply(null, templateLoader).done(callback);
    }
};

(function(){
    var floatMenu = new FloatMenu({menuboxLayer:[
        {icon:'images/home_03_08.png',txt:'返回',pos:'top',id:'menuBack',events:'click'},
        {icon:'images/home_07_14.png',txt:'顶部',pos:'bottom',id:'menuTop',events:'click'},
        {icon:'images/home_07_09.png',txt:'首页',pos:'left',id:'menuHome',events:'click'},
        {icon:'images/home_07_10.png',txt:'客服',pos:'left',id:'menuService',events:'click'}
    ],
        menuBack:function(){
            window.history.back();
        },
        menuTop:function(){
            window.scrollTo(0,0);
        },
        menuHome:function(){
            location.href='index.html';
        },
        menuService:function(){
            alert('service');
        }});
})();


